package com.ardf.service;

import com.ardf.entity.Card;
import com.ardf.entity.Print;
import com.ardf.entity.ReplaceCard;
import com.ardf.entity.dto.CardDto;
import com.ardf.entity.dto.CardSearchAllDto;
import com.ardf.entity.dto.ReplaceCardTableDto;
import com.ardf.entity.dto.UnitMenuDto;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ShiYunHao
 * @since 2025-01-06
 */
public interface ICardService extends IService<Card> {
    /**
     * 获取单位目录
     * @param competitionId
     * @return
     */
    List<UnitMenuDto> getMenu(Long competitionId);

    /**
     * 制卡分页
     */
    Page<CardSearchAllDto> searchAll(Integer pageSize, Integer pageNum, Long unitId, String searchAll);

    Boolean undateTPCard(Card card);

    Boolean insertTPCard(CardDto card);

    /**
     * author:容伟洪
     * time:2025-2-24
     * description：根据赛事id查询指卡号是否在当前赛事中存在
     */
    Boolean selectByComAndNum(Long competitionId,String number);


    /**
     * author:容伟洪
     * time:2025-2-24
     * description：根据Tp卡号和项目id查询选手id
     */
    Card selectByTp(String number,Long projectId);

    /**
     * 补卡分页
     */
    Page<ReplaceCardTableDto> replaceCardSearchAll(Integer pageSize, Integer pageNum, Long competitionId, String searchAll);

    /**
     * author:容伟洪
     * time:2025-3-8
     * description：根据选手Id查询所有的补卡记录
     */
    List<CardDto> selectReplaceCardByAthId(Long athleteId);

    /**
     * author:容伟洪
     * time:2025-3-8
     * description：根据赛事id查找所有的指卡信息
     */
    ReplaceCard selectReplaceCardByComIdAndNum(Long competitionId, String number);

    /**
     * author:容伟洪
     * time:2025-3-12
     * description：根据指卡选手id查找当前选手的信息
     */

    Print selectPrintByAthId(Long athId);

    /**
     * author:容伟洪
     * time:2025-3-12
     * description：根据指卡id查找当前选手的信息
     */

    Print selectPrintById(Long athId);

}
